﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Model;
using System.Net;
using System.Text;

public partial class MembershipCard_wechat_web_MDSearch : WeiPage
{
    WeiXinRequestBO wb = new WeiXinRequestBO();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {

                Session["X"] = "121.467095";
                Session["Y"] = "31.238878";
                if (Request.QueryString["code"] != null)
                {
                    try
                    {
                        string url = string.Format(@"https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + GetAppid() + "&secret=" + GetSecret() + "&code={0}&grant_type=authorization_code", Request.QueryString["code"].ToString());
                        string token = PostRequest(url);
                        if (token.Contains("7200"))
                        {
                            string[] b = token.Split('\"');
                            Session["FromUserName"] = b[13];
                            Session["ToUserName"] = GetAppid();
                        }
                    }
                    catch (Exception)
                    {

                    }
                }

            }
            catch (Exception)
            {

            }
        }

        try
        {
            if (!IsPostBack)
            {

                if ((Request.QueryString["FromUserName"] != null || Session["FromUserName"] != null) && (Request.QueryString["ToUserName"] != null || Session["ToUserName"] != null))
                {
                    string user = Request.QueryString["FromUserName"] == null ? Session["FromUserName"].ToString() : Request.QueryString["FromUserName"].ToString();
                    string user2 = Request.QueryString["ToUserName"] == null ? Session["ToUserName"].ToString() : Request.QueryString["ToUserName"].ToString();
                    List<WeiXinRequest> list = wb.GetModelList(string.Format(" Wxevent='location' AND FromUserName='{0}' ORDER BY id DESC ", user));
                    if (list.Count == 0)
                    {
                        Response.Write(@"<script> var markerArr = [{ title: '佰草集汉方SPA', content: '佰草集汉方SPA', point: '121.467095|31.238878', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} }
		 ];
        function createMap(){
        var map = new BMap.Map('dituContent');
        var point = new BMap.Point(121.488186,31.249162);
        map.centerAndZoom(point,12);
        window.map = map;
    }</script>");
                        Session["X"] = "121.467095";
                        Session["Y"] = "31.238878";
                    }
                    else
                    {
                        string mp = @"<script> var markerArr = [{ title: '你的位置', content: '你的位置', point: '{0}|{1}', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} }
		 ];
function createMap(){
        var map = new BMap.Map('dituContent');
        var point = new BMap.Point({0},{1});
        map.centerAndZoom(point,12);
        window.map = map;
    }</script>";
                        mp = mp.Replace("{0}", Session["X"].ToString()).Replace("{1}", Session["Y"].ToString());
                        Response.Write(mp);
                        Session["X"] = list[0].Location_X;
                        Session["Y"] = list[0].Location_Y;
                        WebClient client = new WebClient();
                        string url2 = "http://maps.google.com/maps/api/geocode/xml?latlng=" + list[0].Location_X + "," + list[0].Location_Y + "&language=zh-CN&sensor=false";
                        client.Encoding = Encoding.UTF8;
                        string responseTest = client.DownloadString(url2);
                        if (responseTest.Contains("上海"))
                        {
                            DropDownList1.SelectedValue = "上海";
                        }
                        else if (responseTest.Contains("北京"))
                        {
                            DropDownList1.SelectedValue = "北京";
                        }
                        else if (responseTest.Contains("苏州"))
                        {
                            DropDownList1.SelectedValue = "苏州";
                        }
                        else if (responseTest.Contains("常州"))
                        {
                            DropDownList1.SelectedValue = "常州";
                        }
                        else if (responseTest.Contains("南阳"))
                        {
                            DropDownList1.SelectedValue = "河南";
                        }
                        else
                        {
                            DropDownList1.SelectedValue = "上海";
                        }
                        DropDownList1_SelectedIndexChanged(null, null);


                        // Response.Redirect(string.Format("http://api.map.baidu.com/place/search?query=佰草集汉方SPA&location={0},{1}&radius=1000&region=上海&output=html&src=yourCompanyName|yourAppName", list[0].Location_X, list[0].Location_Y));
                    }
                }
                else
                {
                    Response.Write(@"<script> var markerArr = [{ title: '佰草集汉方SPA', content: '佰草集汉方SPA', point: '121.467095|31.238878', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} }
		 ];
function createMap(){
        var map = new BMap.Map('dituContent');//在百度地图容器中创建一个地图
        var point = new BMap.Point(121.488186,31.249162);//定义一个中心点坐标
        map.centerAndZoom(point,12);//设定地图的中心点和坐标并将地图显示在地图容器中
        window.map = map;//将map变量存储在全局
    }</script>");
                }
            }
        }
        catch (Exception)
        {

        }

    }


    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList2.Items.Clear();
        DropDownList2.Items.Add(new ListItem("请选择门店", ""));
        if (DropDownList1.SelectedValue == "上海")
        {
            DropDownList2.Items.Add(new ListItem("旗舰店", "121.467095,31.238878"));
            DropDownList2.Items.Add(new ListItem("保定店", "121.515285,31.265157"));
            DropDownList2.Items.Add(new ListItem("永银店", "121.487187,31.229545"));
            DropDownList2.Items.Add(new ListItem("船厂店", "121.466104,31.192337"));
            DropDownList2.Items.Add(new ListItem("联洋店", "121.56417,31.232502"));

            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
      <li>
       <h2>
       旗舰店</h2>
       <p>静安区北京西路718号</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=静安区北京西路718号&location={0},{1}&radius=1000&region=上海&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>021-62171178、62171198</strong></p>
      </li>

<li>
       <h2>
       保定店</h2>
       <p>虹口区唐山路855号</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=虹口区唐山路855号&location={0},{1}&radius=1000&region=上海&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>021-65958808、25012032</strong></p>
      </li>

<li>
       <h2>
       永银店</h2>
       <p>黄浦区西藏南路228号永银大厦6楼</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=黄浦区西藏南路228号&location={0},{1}&radius=1000&region=上海&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>021-63855050、63855656</strong></p>
      </li>

<li>
       <h2>
       船厂店</h2>
       <p>徐汇区龙华中路602号正大乐城广场7-206</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=徐汇区龙华中路602号&location={0},{1}&radius=1000&region=上海&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>021-60130389</strong></p>
      </li>

<li>
       <h2>
       联洋店</h2>
       <p>浦东新区芳甸路300号联洋广场A区4楼</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=浦东新区芳甸路300号&location={0},{1}&radius=1000&region=上海&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>021-61650596、61650595</strong></p>
      </li>



   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

            string mp = @"<script> var markerArr = [{ title: '旗舰店', content: '旗舰店', point: '121.467095|31.238878', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} } ,
{ title: '保定店', content: '保定店', point: '121.515285|31.265157', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} },
{ title: '永银店', content: '永银店', point: '121.487187|31.229545', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} },
{ title: '船厂店', content: '船厂店', point: '121.466104|31.192337', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} },
{ title: '联洋店', content: '联洋店', point: '121.56417|31.232502', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} },
{ title: '你的位置', content: '你的位置', point: '{0}|{1}', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} }
]; function createMap() {  var map = new BMap.Map('dituContent');   var point = new BMap.Point(121.467095,31.238878);  map.centerAndZoom(point, 12);  window.map = map; }</script>";
            mp = mp.Replace("{0}", Session["X"].ToString()).Replace("{1}", Session["Y"].ToString());
            Response.Write(mp);
        }
        else if (DropDownList1.SelectedValue == "北京")
        {
            DropDownList2.Items.Add(new ListItem("金融街店", "116.368456,39.921006"));
            DropDownList2.Items.Add(new ListItem("凯德晶品店", "116.30395,39.91505"));
            DropDownList2.Items.Add(new ListItem("颐堤港店", "116.497383,39.975677"));
            DropDownList2.Items.Add(new ListItem("未来广场店", "116.440238,39.995855"));
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
      <li>
       <h2>
       金融街店</h2>
       <p>西城区金融街18号金融街购物中心L312</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=北京市西城区金融街18号&location={0},{1}&radius=1000&region=北京&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>010-66290415、66290416</strong></p>
      </li>

<li>
       <h2>
       凯德晶品店</h2>
       <p>海淀区复兴路51号凯德晶品购物中心3F18-19A</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=北京市海淀区复兴路51号凯德晶品购物中心&location={0},{1}&radius=1000&region=北京&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>010-68260331、68260332</strong></p>
      </li>

<li>
       <h2>
       颐堤港店</h2>
       <p>朝阳区酒仙桥路18号B1</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=北京市朝阳区酒仙桥路18号&location={0},{1}&radius=1000&region=北京&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>010-84260455</strong></p>
      </li>

<li>
       <h2>
       未来广场店</h2>
       <p>朝阳区北四环东路73号院1号楼F4-14号</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=北京市朝阳区北四环东路73号&location={0},{1}&radius=1000&region=北京&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>010-84445705、84445706</strong></p>
      </li>

   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

            string mp = @"<script> var markerArr = [{ title: '金融街店', content: '金融街店', point: '116.368456|39.921006', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} } ,
{ title: '凯德晶品店', content: '凯德晶品店', point: '116.30395|39.91505', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} },
{ title: '颐堤港店', content: '颐堤港店', point: '116.497383|39.975677', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} },
{ title: '未来广场店', content: '未来广场店', point: '116.440238|39.995855', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} },
{ title: '你的位置', content: '你的位置', point: '{0}|{1}', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} }
]; function createMap() {  var map = new BMap.Map('dituContent');   var point = new BMap.Point(116.30395,39.91505);  map.centerAndZoom(point, 12);  window.map = map; }</script>";
            mp = mp.Replace("{0}", Session["X"].ToString()).Replace("{1}", Session["Y"].ToString());
            Response.Write(mp);
        }
        else if (DropDownList1.SelectedValue == "苏州")
        {
            DropDownList2.Items.Add(new ListItem("印象城店", "120.671008,31.321935"));
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
      <li>
       <h2>
       印象城店</h2>
       <p>工业园区现代大道1699号印象城购物中心4F</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=江苏省苏州市工业园区现代大道1699号&location={0},{1}&radius=1000&region=江苏省苏州市&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>0512-68733826</strong></p>
      </li>

   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());
            string mp = @"<script> var markerArr = [{ title: '印象城店', content: '印象城店', point: '120.671008|31.321935', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} },
{ title: '你的位置', content: '你的位置', point: '{0}|{1}', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} }
]; function createMap() {  var map = new BMap.Map('dituContent');   var point = new BMap.Point(120.671008,31.321935);  map.centerAndZoom(point, 12);  window.map = map; }</script>";
            mp = mp.Replace("{0}", Session["X"].ToString()).Replace("{1}", Session["Y"].ToString());
            Response.Write(mp);
        }
        else if (DropDownList1.SelectedValue == "常州")
        {
            DropDownList2.Items.Add(new ListItem("正方京城店", "119.962893,31.786805"));
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
      <li>
       <h2>
       正方京城店</h2>
       <p>钟楼区局前街（北大街路口）180号正方京城5号楼3楼（百盛购物中心）</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=江苏省常州市钟楼区局前街（北大街路口）180号&location={0},{1}&radius=1000&region=江苏省常州市&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>0519-81083836</strong></p>
      </li>

   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());
            string mp = @"<script> var markerArr = [{ title: '正方京城店', content: '正方京城店', point: '119.962893|31.786805', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} },
{ title: '你的位置', content: '你的位置', point: '{0}|{1}', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} }
]; function createMap() {  var map = new BMap.Map('dituContent');   var point = new BMap.Point(119.962893,31.786805);  map.centerAndZoom(point, 12);  window.map = map; }</script>";
            mp = mp.Replace("{0}", Session["X"].ToString()).Replace("{1}", Session["Y"].ToString());
            Response.Write(mp);
        }
        else if (DropDownList1.SelectedValue == "河南")
        {
            DropDownList2.Items.Add(new ListItem("南阳店", "112.578252,32.995235"));
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
      <li>
       <h2>
       南阳店</h2>
       <p>南阳市（滨河路与鼎盛路交叉口）三川盛唐二期18号楼一楼（滨河体育中心北）</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=河南省南阳市（滨河路与鼎盛路交叉口）三川盛唐二期18号楼一楼&location={0},{1}&radius=1000&region=河南省南阳市&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>0377-61383838/61383939</strong></p>
      </li>

   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());
            string mp = @"<script> var markerArr = [{ title: '南阳店', content: '南阳店', point: '112.578252|32.995235', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} },
{ title: '你的位置', content: '你的位置', point: '{0}|{1}', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} }
]; function createMap() {  var map = new BMap.Map('dituContent');   var point = new BMap.Point(112.578252,32.995235);  map.centerAndZoom(point, 12);  window.map = map; }</script>";
            mp = mp.Replace("{0}", Session["X"].ToString()).Replace("{1}", Session["Y"].ToString());
            Response.Write(mp);
        }
        else
        {
            AlertMessage("请选择城市");
            return;
        }
    }
    protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
    {
        se.InnerHtml = "";
        string mp = @"<script> var markerArr = [{ title: '" + DropDownList2.SelectedItem.Text + "', content: '" + DropDownList2.SelectedItem.Text + "', point: '" + DropDownList2.SelectedValue.Replace(",", "|") + "', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} },{ title: '你的位置', content: '你的位置', point: '{0}|{1}', isOpen: 0, icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12} } ]; function createMap() {  var map = new BMap.Map('dituContent');   var point = new BMap.Point(" + DropDownList2.SelectedValue + ");  map.centerAndZoom(point, 12);  window.map = map; }</script>";
        mp = mp.Replace("{0}", Session["X"].ToString()).Replace("{1}", Session["Y"].ToString());
        Response.Write(mp);
        if (DropDownList2.SelectedItem.Text == "旗舰店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
      <li>
       <h2>
       旗舰店</h2>
       <p>静安区北京西路718号
</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=静安区北京西路718号
&location={0},{1}&radius=1000&region=上海&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>021-62171178、62171198</strong></p>
      </li>
   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else if (DropDownList2.SelectedItem.Text == "保定店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
 <li>
       <h2>
       保定店</h2>
       <p>虹口区唐山路855号</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=虹口区唐山路855号&location={0},{1}&radius=1000&region=上海&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>021-65958808、25012032</strong></p>
      </li>
   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else if (DropDownList2.SelectedItem.Text == "永银店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
        <li><h2>
       永银店</h2>
       <p>黄浦区西藏南路228号永银大厦6楼</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=黄浦区西藏南路228号&location={0},{1}&radius=1000&region=上海&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>021-63855050、63855656</strong></p>
      </li>
   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else if (DropDownList2.SelectedItem.Text == "船厂店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
         <li><h2>
       船厂店</h2>
       <p>徐汇区龙华中路602号正大乐城广场7-206</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=徐汇区龙华中路602号&location={0},{1}&radius=1000&region=上海&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>021-60130389</strong></p>
      </li>
   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else if (DropDownList2.SelectedItem.Text == "联洋店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
        <li><h2>
       联洋店</h2>
       <p>浦东新区芳甸路300号联洋广场A区4楼</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=浦东新区芳甸路300号&location={0},{1}&radius=1000&region=上海&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>021-61650596、61650595</strong></p>
      </li>
   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else if (DropDownList2.SelectedItem.Text == "金融街店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
        <li><h2>
       金融街店</h2>
       <p>西城区金融街18号金融街购物中心L312</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=北京市西城区金融街18号&location={0},{1}&radius=1000&region=北京&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>010-66290415、66290416
孙琳：13581887820</strong></p>
      </li>
   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else if (DropDownList2.SelectedItem.Text == "凯德晶品店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
        <li><h2>
       凯德晶品店</h2>
       <p>海淀区复兴路51号凯德晶品购物中心3F18-19A</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=北京市海淀区复兴路51号凯德晶品购物中心&location={0},{1}&radius=1000&region=北京&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>010-68260331、68260332
</strong></p>
      </li>
   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else if (DropDownList2.SelectedItem.Text == "颐堤港店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
       <li> <h2>
       颐堤港店</h2>
       <p>朝阳区酒仙桥路18号B1地铁层</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=北京市朝阳区酒仙桥路18号&location={0},{1}&radius=1000&region=北京&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>010-84260455</strong></p>
      </li>
   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else if (DropDownList2.SelectedItem.Text == "未来广场店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
       <li> <h2>
       未来广场店</h2>
       <p>朝阳区北四环东路73号</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=北京市朝阳区北四环东路73号院1号楼F4-14号&location={0},{1}&radius=1000&region=北京&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>010-84445705、84445706</strong></p>
      </li>
   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else if (DropDownList2.SelectedItem.Text == "印象城店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
        <li><h2>
       印象城店</h2>
       <p>工业园区现代大道1699号印象城购物中心4F</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=江苏省苏州市工业园区现代大道1699号&location={0},{1}&radius=1000&region=江苏省苏州市&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>0512-68733826</strong></p>
      </li>
   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else if (DropDownList2.SelectedItem.Text == "正方京城店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
      <li>
       <h2>
       正方京城店</h2>
       <p>钟楼区局前街（北大街路口）180号正方京城5号楼3楼（百盛购物中心）</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=江苏省常州市钟楼区局前街（北大街路口）180号&location={0},{1}&radius=1000&region=江苏省常州市&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>0519-81083836</strong></p>
      </li>

   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else if (DropDownList2.SelectedItem.Text == "南阳店")
        {
            se.InnerHtml = string.Format(@"<ul>
     <li><bdo>根据您搜索的关键词找到以下门店地址</bdo></li>
      <li>
       <h2>
       南阳店</h2>
       <p>南阳市（滨河路与鼎盛路交叉口）三川盛唐二期18号楼一楼</p>
       <p><span><a href='http://api.map.baidu.com/place/search?query=河南省南阳市（滨河路与鼎盛路交叉口）三川盛唐二期18号楼一楼&location={0},{1}&radius=1000&region=河南省南阳市&output=html&src=yourCompanyName|yourAppName'>查看地图</a></span><strong>0377-61383838/61383939</strong></p>
      </li>

   </ul>
    <br />", Session["X"].ToString(), Session["Y"].ToString());

        }
        else
        {
            AlertMessage("请选择门店");
            return;
        }

    }

    
}